﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.master" AutoEventWireup="true" CodeFile="join.aspx.cs" Inherits="join" EnableEventValidation="false" %>

<%@ Register Assembly="WuDada.Web" Namespace="WuDada.Web.UI" TagPrefix="cc1" %>
<%@ Register Src="UserControl/Bank.ascx" TagName="Bank" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <link href="css/NewCss.css" rel="stylesheet" type="text/css" />
    <script src="Scripts/jquery.twzipcode-1.6.0.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(init);

        //網頁上所有的DOM都載入後
        function init() {
            $('#zip1').twzipcode({
                onCountySelect: function () {
                    setTxtValue($(this), 'ctl00_ContentPlaceHolder2_txtCity');
                },
                onDistrictSelect: function () {
                    setTxtValue($(this), 'ctl00_ContentPlaceHolder2_txtArea');
                },
                css: ['county', 'district', 'zip1']
            });
            $('#zip2').twzipcode({
                onCountySelect: function () {
                    setTxtValue($(this), 'ctl00_ContentPlaceHolder2_txtCompanyCity');
                },
                onDistrictSelect: function () {
                    setTxtValue($(this), 'ctl00_ContentPlaceHolder2_txtCompanyArea');
                },
                css: ['county', 'district', 'zip1']
            });
        }        

        function setTxtValue(from, targetId) {
            var selectedText = $(from).find("option:selected").val();
            $("#" + targetId).val(selectedText);
        }

        function changeImg() {
            document.getElementById("safecode").src = "captcha/Handler.ashx?" + Math.random();
        }

        function ToggleAdvProvider() {
            if ($("#AdvProviderCheck").prop('checked')) {
                $("#AdProvider").show();
            }
            else {
                $("#AdProvider").hide();
            }
        }
    </script>
    <style type="text/css">
        .zip1{display:none;}
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
    <asp:Panel runat="server" ID="pnlUI">
<%--<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>--%>
<div id="All-Table">
  <div id="Title-Line">
    <h2>加入會員</h2>
  </div>
  <img src="image/jon-p1.png" width="954" height="134" class="Join-PP" />
  <table border="0" cellpadding="0" cellspacing="0" class="Join-Table">
    <tr>
      <td colspan="4" class="Join-txt-red">標註 ★ 為必填項目</td>
    </tr>
    <tr>
      <td width="142"><span class="Join-txt-red">★</span>需求</td>
        <td colspan="3" class="txt-size13">
            <cc1:ExtensionCheckBoxList ID="ckbRequirement" runat="server" RepeatDirection="Horizontal">
                <asp:ListItem Value="出租鐵門">
                </asp:ListItem>
                <asp:ListItem Value="下廣告">
                </asp:ListItem>
            </cc1:ExtensionCheckBoxList>           
        </td>
    </tr>
    <tr>
      <td><span class="Join-txt-red">★</span>E-mail(會員帳號)</td>
      <td colspan="3">
          <asp:TextBox ID="txtEmail" runat="server" CssClass="Join-Order" size="55"></asp:TextBox>
      <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="請輸入E-mail(會員帳號)"
                  ControlToValidate="txtEmail" Display="None" ValidationGroup="Save"></asp:RequiredFieldValidator>      
      <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ValidationGroup="Save" ErrorMessage="E-mail(會員帳號)格式不正確"
                  Display="None" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ControlToValidate="txtEmail"></asp:RegularExpressionValidator>
      </td>
    </tr>
    <tr>
      <td><span class="Join-txt-red">★</span>會員名稱</td>
      <td colspan="3">
          <asp:TextBox ID="txtName" runat="server" CssClass="Join-Order" size="55"></asp:TextBox>     
        <asp:RequiredFieldValidator ID="RequiredFieldValidator21" runat="server" ErrorMessage="請輸入會員名稱"
                  ControlToValidate="txtName" Display="None" ValidationGroup="Save"></asp:RequiredFieldValidator>
      </td>
    </tr>
    <tr>
      <td><span class="Join-txt-red">★</span>密碼</td>
      <td colspan="3">
          <asp:TextBox ID="txtPassword" runat="server" CssClass="Join-Order" size="55" TextMode="Password" placeholder="請輸入長度4-10碼,並包含一個英文與數字"></asp:TextBox>
          <asp:RequiredFieldValidator ID="RequiredFieldValidator22" runat="server" ErrorMessage="請輸入密碼"
                  ControlToValidate="txtPassword" Display="None" ValidationGroup="Save"></asp:RequiredFieldValidator>
          <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ValidationGroup="Save" ErrorMessage="密碼格式不正確(請輸入長度4-10碼,並包含一個英文與數字)"
                  Display="None" ValidationExpression="(?=.{4,10})(?=.*[a-zA-Z])(?=.*\d).*$" ControlToValidate="txtPassword"></asp:RegularExpressionValidator>
      </td>
    </tr>
    <tr>
      <td><span class="Join-txt-red">★</span>確認密碼</td>
      <td colspan="3">
          <asp:TextBox ID="txtCheckPassword" runat="server" CssClass="Join-Order" size="55" TextMode="Password"></asp:TextBox>
          <asp:RequiredFieldValidator ID="RequiredFieldValidator23" runat="server" ErrorMessage="請輸入確認密碼"
                  ControlToValidate="txtCheckPassword" Display="None" ValidationGroup="Save"></asp:RequiredFieldValidator>
      </td>
    </tr>
    <tr>
      <td><span class="Join-txt-red">★</span>聯絡電話</td>
      <td colspan="3">
          <asp:TextBox ID="txtPhone" runat="server" CssClass="Join-Order" size="55"></asp:TextBox>
          <asp:RequiredFieldValidator ID="RequiredFieldValidator24" runat="server" ErrorMessage="請輸入聯絡電話"
                  ControlToValidate="txtPhone" Display="None" ValidationGroup="Save"></asp:RequiredFieldValidator>
          <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ValidationGroup="Save" ErrorMessage="連絡電話格式錯誤"
                  Display="None" ValidationExpression="^\(?\d{2}\)?[\s\-]?\d{4}\-?\d{4}$" ControlToValidate="txtPhone"></asp:RegularExpressionValidator>
      </td>
    </tr>
    <tr>
      <td>　手機</td>
      <td colspan="3">
          <asp:TextBox ID="txtMobile" runat="server" CssClass="Join-Order" size="55"></asp:TextBox>
          <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server" ValidationGroup="Save" ErrorMessage="手機格式錯誤"
                  Display="None" ValidationExpression="^(09)([0-9]{8})$" ControlToValidate="txtMobile"></asp:RegularExpressionValidator>
      </td>
    </tr>
    <tr>
      <td>　傳真</td>
      <td colspan="3">
          <asp:TextBox ID="txtFax" runat="server" CssClass="Join-Order" size="55"></asp:TextBox>
          <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" ValidationGroup="Save" ErrorMessage="傳真格式錯誤"
                  Display="None" ValidationExpression="^\(?\d{2}\)?[\s\-]?\d{4}\-?\d{4}$" ControlToValidate="txtFax"></asp:RegularExpressionValidator>
      </td>
    </tr>
    <tr>
      <td valign="top"><span class="Join-txt-red">★</span>地址</td>
      <td colspan="3">
          <div id="zip1"></div>
          <div style="padding-top:5px;"><asp:TextBox ID="txtRoad" runat="server" CssClass="Join-Order" size="55"></asp:TextBox></div>
          <asp:TextBox ID="txtCity" runat="server" Style="display:none;"></asp:TextBox>
          <asp:TextBox ID="txtArea" runat="server" Style="display:none;"></asp:TextBox>        
          <asp:RequiredFieldValidator ID="RequiredFieldValidator25" runat="server" ErrorMessage="請輸入地址"
                  ControlToValidate="txtRoad" Display="None" ValidationGroup="Save"></asp:RequiredFieldValidator>
      </td>
    </tr>
    <tr>
      <td><span class="Join-txt-red">★</span>是否訂閱電子報</td>
      <td colspan="3" class="txt-size13">
          <asp:RadioButtonList ID="rdoReceiveEpaper" runat="server" RepeatDirection="Horizontal">
              <asp:ListItem Text="是" Value="1"></asp:ListItem>
              <asp:ListItem Text="否" Value="0"></asp:ListItem>
          </asp:RadioButtonList>
          <asp:RequiredFieldValidator ID="RequiredFieldValidator20" runat="server" ErrorMessage="請選擇是否訂閱電子報"
                  ControlToValidate="rdoReceiveEpaper" Display="None" ValidationGroup="Save"></asp:RequiredFieldValidator>
      </td>
    </tr>
    <tr>
      <td valign="top"><span class="Join-txt-red">★</span>請輸入驗證碼</td>
      <td width="91">
          <asp:TextBox ID="txtConfirmationCode" runat="server" CssClass="Join-Order" size="12"></asp:TextBox>
        <span class="txt-size13">忽略大小寫</span></td>
      <td width="204"><img id="safecode" src="captcha/Handler.ashx" width="150" height="50" /></td>
      <td width="113" valign="bottom"><a href="javascript:changeImg();" class="Btn-Blacl-11">更換驗證碼</a></td>
      </tr>
    <tr>
      <td colspan="4"><div class="Join-Adv-King">
        <input type="checkbox" name="AdvProviderCheck" id="AdvProviderCheck" onclick="ToggleAdvProvider()" />
      </div></td>
      </tr>
      </table>
      <table border="0" cellpadding="0" cellspacing="0" class="Join-Table" id="AdProvider" style="display:none;">
    <tr>
      <td width="150">　公司名稱</td>
      <td colspan="3"><asp:TextBox ID="txtCompany" runat="server" CssClass="Join-Order" size="55"></asp:TextBox></td>
    </tr>
    <tr>
      <td>　營利事業統一編號</td>
      <td colspan="3"><asp:TextBox ID="txtCompanyNo" runat="server" CssClass="Join-Order" size="55"></asp:TextBox></td>
    </tr>
    <tr>
      <td>　負責人</td>
      <td colspan="3"><asp:TextBox ID="txtCompanyCharge" runat="server" CssClass="Join-Order" size="55"></asp:TextBox></td>
    </tr>
    <tr>
      <td>　公司電話</td>
      <td colspan="3"><asp:TextBox ID="txtCompanyPhone" runat="server" CssClass="Join-Order" size="55"></asp:TextBox></td>
    </tr>
    <tr>
      <td>　公司傳真</td>
      <td colspan="3"><asp:TextBox ID="txtCompanyFax" runat="server" CssClass="Join-Order" size="55"></asp:TextBox></td>
    </tr>
    <tr>
      <td>　公司地址</td>
      <td colspan="3">
          <div id="zip2"></div>
        <div style="padding-top:5px;"><asp:TextBox ID="txtCompanyRoad" runat="server" CssClass="Join-Order" size="55"></asp:TextBox></div>
          <asp:TextBox ID="txtCompanyCity" runat="server" Style="display:none;"></asp:TextBox>
          <asp:TextBox ID="txtCompanyArea" runat="server" Style="display:none;"></asp:TextBox>
      </td>
      </tr>
    <tr>
      <td>　匯款銀行</td>
      <td colspan="3">
          <uc1:Bank ID="bank" runat="server" />
      </td>
    </tr>
    <tr>
      <td>　匯款帳戶</td>
      <td colspan="3"><asp:TextBox ID="txtBankAccount" runat="server" CssClass="Join-Order" size="55"></asp:TextBox></td>
    </tr>
    <tr>
      <td>　戶頭名稱</td>
      <td colspan="3"><asp:TextBox ID="txtBankTitle" runat="server" CssClass="Join-Order" size="55"></asp:TextBox></td>
    </tr>
          </table>
      <table border="0" cellpadding="0" cellspacing="0" class="Join-Table">
    <tr>
      <td width="150">&nbsp;</td>
      <td colspan="3">
          <asp:CheckBox runat="server" ID="ckAgree" />
        <span class="Join-txt-red">我已閱讀並同意&quot;<a href="#" class="Btn-red">會員服務條款</a>&quot;</span></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td colspan="3">
          <asp:LinkButton ID="btnSend" runat="server" onclick="btnSend_Click" ValidationGroup="Save" >
      <p class="Btn-New1">確定送出</p>
    </asp:LinkButton>
        <a href="join.aspx"><p class="Btn-New1">清除重填</p></a>
      </td>
    </tr>
  </table>
</div>
<asp:ValidationSummary ID="ValidationSummary1" runat="server" ValidationGroup="Save" 
        ShowMessageBox="True" ShowSummary="False"/>
<%--        </ContentTemplate>
    </asp:updatepanel>--%>
        </asp:Panel>
</asp:Content>

